package com.yq.tanhua.ui.mine

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.Button
import android.widget.EditText
import androidx.fragment.app.Fragment
import com.yq.tanhua.R
import com.yq.tanhua.test.TestRepository
import com.yq.tanhua.im.ImFunction
import dagger.hilt.android.AndroidEntryPoint
import javax.inject.Inject

@AndroidEntryPoint
class MineFragment : Fragment() {


    @Inject
    lateinit var testRepository: TestRepository

    //    @Inject
//    lateinit var imFunction: ImFunction
    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View {
        val view = LayoutInflater.from(context).inflate(R.layout.tanhua_fragment_mine, null)
        return view
    }


    lateinit var etId: EditText
    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        testRepository.test()
        etId = view.findViewById<EditText>(R.id.etId)

        val btnSend = view.findViewById<Button>(R.id.btnSend)
        btnSend.setOnClickListener {
//            imFunction.sendMsg("发送一条测试数据", etId.text.trim().toString())
        }
    }

}